<form data-toggle="ajaxform" action="/admin/permission/list" data-options="{callback:after_set_permission}">
    <input type="hidden" name="type_id" value="{{$typeid}}">
    <input type="hidden" name="type_action" value="{{$typeAction}}">
    <input type="hidden" name="node_id" value="{{$nodeid}}">
    <div class="bjui-row col-2">
        @foreach ($list as $v)
            <div class="row-input">
                @if($v['permission_id'])
                <input type="checkbox" name="del_privilege_id[]" id="set-process-action-{{$v['id']}}" value="{{$v['id']}}" data-toggle="icheck" data-label="{{$v['title']}}" checked="">
                @else
                    <input type="checkbox" name="privilege_id[]" id="set-process-action-{{$v['id']}}" value="{{$v['id']}}" data-toggle="icheck" data-label="{{$v['title']}}">
                @endif
                @if($typeAction == 1)
                    <button type="button" class="btn-green" data-icon="search" data-toggle="dialog" data-options="{id:'test_dialog1', url:'/admin/permission/look-action-set', title:'设置不可见查看字段', data: {privilege_id:{{$v['id']}}, process_ordertype_id:{{$nodeid}}},}">字段</button>
                @endif


                @if($typeAction == 4)
                    <!-- 增加角色是否需要填写件数-->
                    <button style="width:100%;" type="button" class="btn-green" data-icon="search" data-toggle="dialog" data-options="{id:'test_dialog1', url:'/admin/permission/need-piece-set', title:'设置是否填写件数', data: {privilege_id:{{$v['id']}}, process_ordertype_id:{{$nodeid}}},}">设置是否填写件数</button>
                    <br>
                    <!-- 增加角色能否成品入库-->
                    <button style="width:100%;" type="button" class="btn-green" data-icon="search" data-toggle="dialog" data-options="{id:'test_dialog1', url:'/admin/permission/finished-product-set', title:'设置能否成品入库', data: {privilege_id:{{$v['id']}}, process_ordertype_id:{{$nodeid}}},}">设置能否成品入库</button>
                    <br>
                    <input type="text" value="{{$v['sort']}}" style="width:60px;" readonly>

                    <button type="button" class="btn-green" data-icon="search" data-toggle="dialog" data-options="{id:'test_dialog1', url:'/admin/permission/privilege-sort-set', title:'设置排序值', data: {privilege_id:{{$v['id']}}, process_ordertype_id:{{$nodeid}},action_type:4},}">设置排序值</button>
                @endif

                @if($typeAction == 7)
                    <button type="button" class="btn-green" data-icon="search" data-toggle="dialog" data-options="{id:'test_dialog1', url:'/admin/permission/base-fields-set', title:'设置可见字段', data: {privilege_id:{{$v['id']}}, process_ordertype_id:{{$nodeid}}},}">字段</button>
                @endif
            </div>
        @endforeach
    </div>
    <div class="btn-group">
        <button type="submit" class="btn-green" data-icon="search">保存</button>
    </div>
</form>
<script>
    function after_set_permission(){
        BJUI.dialog('closeCurrent')
//        BJUI.navtab('refresh','order-type');
    }

    function set_field(){

    }
</script>